home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
Inspectors
/
InspectMe
/
PSWraps.psw
< prev
next >
Wrap
Text File
|
1995-06-12
|
2KB
|
93 lines
defineps PSthing1( int num,size; float width,height; boolean squares)
usertime srand
/getx {rand 1000 mod 1000 div width mul} bind def
/gety {rand 1000 mod 1000 div height mul} bind def
/getradius {rand 1000 mod 1000 div size mul} bind def
/setcolor {rand 1000 mod 1000 div 1 1 sethsbcolor} bind def
/drawcircle {getx gety size 0 360 arc fill flushgraphics} bind def
/drawsquare {getx gety moveto
size 0 rlineto
0 size rlineto
size neg 0 rlineto
closepath
fill } bind def
num{setcolor squares {drawsquare} {drawcircle} ifelse }repeat
endps
defineps PStank( float w,h; boolean highlighted)
w h scale
0 setlinewidth
% left leg
0.05 0.01 moveto 0.1 0.01 lineto 0.1 0.4 lineto 0.05 0.4 lineto closepath
gsave
.666 setgray fill
grestore 0 setgray stroke
% left loadcell
0.02 0.01 moveto 0.13 0.01 lineto 0.13 0.05 lineto 0.02 0.05 lineto closepath
gsave
.666 setgray fill
grestore 0 setgray stroke
% right leg
0.9 0.01 moveto 0.95 0.01 lineto 0.95 0.4 lineto 0.9 0.4 lineto closepath
gsave
.666 setgray fill
grestore 0 setgray stroke
% right loadcell
0.87 0.01 moveto 0.98 0.01 lineto 0.98 0.05 lineto 0.87 0.05 lineto closepath
gsave
.666 setgray fill
grestore 0 setgray stroke
% "X-box" on top
0.4 0.92 moveto 0.6 0.92 lineto 0.6 0.99 lineto 0.4 0.99 lineto closepath
gsave
1 setgray fill
grestore
0.4 0.93 moveto 0.6 0.99 lineto
0.6 0.93 moveto 0.4 0.99 lineto
0 setgray stroke
% top right box
0.6 0.93 moveto 0.75 0.93 lineto 0.75 0.98 lineto 0.6 0.98 lineto closepath
gsave
0.333 setgray fill
grestore 0 setgray stroke
% frame on top
0.22 0.75 moveto 0.35 0.92 lineto 0.65 0.92 lineto 0.77 0.77 lineto
0.75 0.75 lineto 0.64 0.9 lineto 0.36 0.9 lineto 0.24 0.75 lineto
closepath
0.48 0.75 moveto 0.51 0.75 lineto 0.51 0.9 lineto 0.48 0.9 lineto
gsave
.333 setgray fill
grestore 0 setgray stroke
% main box
0 .35 moveto .5 .15 lineto .99 .35 lineto 0.99 0.65 lineto 0 0.65 lineto closepath
gsave
.666 setgray
highlighted {1 setgray} if fill
grestore 0 setgray stroke
% round top of box
gsave
0 .65 translate
1 .3 scale
0.5 0 0.5 0 180 arc closepath
gsave
.666 setgray
highlighted {1 setgray} if fill
grestore 0 setgray stroke
grestore
endps